WEXP batch mode

Hi

Does anyone know how to run WEXP in a form of batch mode, so that you can run multiple exports unattended?

If so, how would this cope with any questions asked?

Many thanks in advance.
Roobroo - Mon Mar 01 10:19:27 EST 2010

Re: WEXP batch mode
Mathias Mamsch - Mon Mar 01 10:52:04 EST 2010

That depends on what WEXP version you are using. The Rational Requirement Framework for example has a WEXP Server which queues export jobs and runs them unattended, while the free WEXP Version that is given from hand to hand has no "do an export for a couple of modules" option, so you will need to get scripting.

BUT: In the free version there is a wexpbatch.dxl script, which can be launched from batch mode and will do an export for the current module in batch mode. So you can make another script, which will load all the modules and then start the export using the wexp_batch.dxl script.
 

string myModules[] = {"/Project/Module1", "/Project/Module2"}  // my modules go here
 
for i in 0:(sizeof myModules)-1 do {
     Module m = read(myModules[i], true)
     current = m
     eval_ ("#include <../includes/wexp_batch.dxl>")
     close m
}

 


If you take a closer look then you will see, that in the wexp_batch.dxl all message boxes will be answered by default, meaning Warnings and Erros will be "OK"ed, Confirmations will be "YES"ed.

Regards, Mathias

P.S.: I did not test the code, you might have to adapt it, but i hope you get the idea.

 

Re: WEXP batch mode
Roobroo - Mon Mar 01 11:16:42 EST 2010

Mathias Mamsch - Mon Mar 01 10:52:04 EST 2010

That depends on what WEXP version you are using. The Rational Requirement Framework for example has a WEXP Server which queues export jobs and runs them unattended, while the free WEXP Version that is given from hand to hand has no "do an export for a couple of modules" option, so you will need to get scripting.

BUT: In the free version there is a wexpbatch.dxl script, which can be launched from batch mode and will do an export for the current module in batch mode. So you can make another script, which will load all the modules and then start the export using the wexp_batch.dxl script.
 

string myModules[] = {"/Project/Module1", "/Project/Module2"}  // my modules go here
 
for i in 0:(sizeof myModules)-1 do {
     Module m = read(myModules[i], true)
     current = m
     eval_ ("#include <../includes/wexp_batch.dxl>")
     close m
}

 


If you take a closer look then you will see, that in the wexp_batch.dxl all message boxes will be answered by default, meaning Warnings and Erros will be "OK"ed, Confirmations will be "YES"ed.

Regards, Mathias

P.S.: I did not test the code, you might have to adapt it, but i hope you get the idea.

 

Thank you very much for the information, I was not aware of any of that.

Many thanks

Re: WEXP batch mode
llandale - Mon Mar 01 11:24:15 EST 2010

Mathias Mamsch - Mon Mar 01 10:52:04 EST 2010

That depends on what WEXP version you are using. The Rational Requirement Framework for example has a WEXP Server which queues export jobs and runs them unattended, while the free WEXP Version that is given from hand to hand has no "do an export for a couple of modules" option, so you will need to get scripting.

BUT: In the free version there is a wexpbatch.dxl script, which can be launched from batch mode and will do an export for the current module in batch mode. So you can make another script, which will load all the modules and then start the export using the wexp_batch.dxl script.
 

string myModules[] = {"/Project/Module1", "/Project/Module2"}  // my modules go here
 
for i in 0:(sizeof myModules)-1 do {
     Module m = read(myModules[i], true)
     current = m
     eval_ ("#include <../includes/wexp_batch.dxl>")
     close m
}

 


If you take a closer look then you will see, that in the wexp_batch.dxl all message boxes will be answered by default, meaning Warnings and Erros will be "OK"ed, Confirmations will be "YES"ed.

Regards, Mathias

P.S.: I did not test the code, you might have to adapt it, but i hope you get the idea.

 

Is there a reason to use 'eval_' instead of calling a function that issues the #include?

Re: WEXP batch mode
Mathias Mamsch - Mon Mar 01 11:50:10 EST 2010

llandale - Mon Mar 01 11:24:15 EST 2010
Is there a reason to use 'eval_' instead of calling a function that issues the #include?

The reason is, I don't know how the #includes statements of the wexp_batch.dxl behave when I put them in a loop (global variables that are not global anymore if they are used in functions, etc.) Regards, Mathias